package com.example.recycler.bugtest;

import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

import com.alipay.euler.andfix.patch.PatchManager;

import java.io.IOException;

public class MainActivity extends AppCompatActivity {
    public Fate mFate;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void go1(View v) {
        mFate=new Fate();
        Toast.makeText(this, "Bingo"+mFate.getServent(), Toast.LENGTH_SHORT).show();
    }

    public void go2(View v) {
        Toast.makeText(this, "渡一波金", Toast.LENGTH_SHORT).show();
        PatchManager mpatchManager= MyApp.patchManager;
        try {
            mpatchManager.addPatch(Environment.getExternalStorageDirectory().getAbsolutePath()+"/fgo.apatch");//path of the patch file that was downloaded
            mpatchManager.loadPatch();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

    public void go3(View v) {


    }

    public void go4(View v) {


    }
}
